public class Range implements Runnable {



int low, high;


IteratorHelper<Integer> ih = new IteratorHelper<Integer>(this);




public Range (int low, int high) {

this.low = low;

this.high = high;

}



public boolean hasNext() {

return !ih.done();

}


public int next() {

return ih.get();

}



@Override

public void run() {

for (int i = low; hasNext(); next()) 

{

ih.yield(i);

}


}



}











